package com.cloud.layuimini.dao;

import com.cloud.layuimini.entity.MenuEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface MenuDao extends JpaRepository<MenuEntity, Long>, JpaSpecificationExecutor<MenuEntity> {

    @Query(value = "select * from t_menu where title like :title",
            nativeQuery = true)
    List<Object[]> selectCustom(@Param("title") String title);
}
